﻿using _5._14._2015.App.Data.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using _5._14._2015App.Adaptors.Interfaces;
using _5._14._2015App.Adaptors.Adaptors;
using _5._14._2015App.Models;

namespace _5._14._2015App.Controllers
{
    public class HomeController : Controller
    {
        private IStudentAdapter _adapter;

        public HomeController()
        {
            _adapter = new StudentAdapter(); 
        }

        public HomeController(IStudentAdapter a)
        {
            _adapter = a;
        }

        public ActionResult Index()
        {
            List<Student> model = _adapter.GetAllStudents();
       //    StudentAdapter model = new StudentAdapter
            return View(model);
        }

        public ActionResult CourseView()
        {
            
            //    StudentAdapter model = new StudentAdapter
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}